package com.jmu.edu.IMApplication.net.bean;

import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * null
 * @TableName tag
 */
@Data
public class Tag implements Serializable {
    /**
     * 
     *
     * @mbg.generated 2021-03-05 22:22:58
     */
    private Integer tagId;

    /**
     * 
     *
     * @mbg.generated 2021-03-05 22:22:58
     */
    private String tag;

    /**
     * 
     *
     * @mbg.generated 2021-03-05 22:22:58
     */
    private Integer type;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table tag
     *
     * @mbg.generated 2021-03-05 22:22:58
     */
    private static final long serialVersionUID = 1L;

    public Tag() {
    }

    public Tag(String tag, Integer type) {
        this.tag = tag;
        this.type = type;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        Tag tag1 = (Tag) o;
        return Objects.equals(tagId, tag1.tagId) ||
                (Objects.equals(tag, tag1.tag) &&
                Objects.equals(type, tag1.type));
    }

    @Override
    public int hashCode() {
        return Objects.hash(tagId, tag, type);
    }

    @Override
    public String toString() {
        return "Tag{" +
                "tagId=" + tagId +
                ", tag='" + tag + '\'' +
                ", type=" + type +
                '}';
    }
}